package com.vcourse.service.api.edu.feign;

import com.vcourse.service.api.edu.feign.fallback.EduCourseServiceFallBack;
import com.vcourse.service.base.dto.CourseDto;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author Zengsh123
 * @date 2020-06-13 14:49
 */
@Service
@FeignClient(value = "vcourse-edu", fallback = EduCourseServiceFallBack.class)
public interface EduCourseService {

    @ApiOperation("根据课程id查询课程信息，服务间调用")
    @GetMapping("/api/edu/course/inner/get-course-dto/{courseId}")
    CourseDto getCourseDtoById(
            @ApiParam(value = "课程ID", required = true)
            @PathVariable String courseId);
}
